Optimal. Leaf size=111 \[ a^4 x-\frac {b^2 \left (6 a^2+8 a b+3 b^2\right ) \tanh ^3(c+d x)}{3 d}+\frac {b (2 a+b) \left (2 a^2+2 a b+b^2\right ) \tanh (c+d x)}{d}+\frac {b^3 (4 a+3 b) \tanh ^5(c+d x)}{5 d}-\frac {b^4 \tanh ^7(c+d x)}{7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 111, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {4128, 390, 206} \[ -\frac {b^2 \left (6 a^2+8 a b+3 b^2\right ) \tanh ^3(c+d x)}{3 d}+\frac {b (2 a+b) \left (2 a^2+2 a b+b^2\right ) \tanh (c+d x)}{d}+a^4 x+\frac {b^3 (4 a+3 b) \tanh ^5(c+d x)}{5 d}-\frac {b^4 \tanh ^7(c+d x)}{7 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 390
Rule 4128
Rubi steps
\begin {align*} \int \left (a+b \text {sech}^2(c+d x)\right )^4 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+b-b x^2\right )^4}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left (b (2 a+b) \left (2 a^2+2 a b+b^2\right )-b^2 \left (6 a^2+8 a b+3 b^2\right ) x^2+b^3 (4 a+3 b) x^4-b^4 x^6+\frac {a^4}{1-x^2}\right ) \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {b (2 a+b) \left (2 a^2+2 a b+b^2\right ) \tanh (c+d x)}{d}-\frac {b^2 \left (6 a^2+8 a b+3 b^2\right ) \tanh ^3(c+d x)}{3 d}+\frac {b^3 (4 a+3 b) \tanh ^5(c+d x)}{5 d}-\frac {b^4 \tanh ^7(c+d x)}{7 d}+\frac {a^4 \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=a^4 x+\frac {b (2 a+b) \left (2 a^2+2 a b+b^2\right ) \tanh (c+d x)}{d}-\frac {b^2 \left (6 a^2+8 a b+3 b^2\right ) \tanh ^3(c+d x)}{3 d}+\frac {b^3 (4 a+3 b) \tanh ^5(c+d x)}{5 d}-\frac {b^4 \tanh ^7(c+d x)}{7 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 1.67, size = 455, normalized size = 4.10 \[ \frac {\text {sech}(c) \text {sech}^7(c+d x) \left (3675 a^4 d x \cosh (2 c+d x)+2205 a^4 d x \cosh (2 c+3 d x)+2205 a^4 d x \cosh (4 c+3 d x)+735 a^4 d x \cosh (4 c+5 d x)+735 a^4 d x \cosh (6 c+5 d x)+105 a^4 d x \cosh (6 c+7 d x)+105 a^4 d x \cosh (8 c+7 d x)+3675 a^4 d x \cosh (d x)-12600 a^3 b \sinh (2 c+d x)+12600 a^3 b \sinh (2 c+3 d x)-5040 a^3 b \sinh (4 c+3 d x)+5040 a^3 b \sinh (4 c+5 d x)-840 a^3 b \sinh (6 c+5 d x)+840 a^3 b \sinh (6 c+7 d x)+16800 a^3 b \sinh (d x)-10920 a^2 b^2 \sinh (2 c+d x)+15120 a^2 b^2 \sinh (2 c+3 d x)-2520 a^2 b^2 \sinh (4 c+3 d x)+5880 a^2 b^2 \sinh (4 c+5 d x)+840 a^2 b^2 \sinh (6 c+7 d x)+18480 a^2 b^2 \sinh (d x)-4480 a b^3 \sinh (2 c+d x)+9408 a b^3 \sinh (2 c+3 d x)+3136 a b^3 \sinh (4 c+5 d x)+448 a b^3 \sinh (6 c+7 d x)+11200 a b^3 \sinh (d x)+2016 b^4 \sinh (2 c+3 d x)+672 b^4 \sinh (4 c+5 d x)+96 b^4 \sinh (6 c+7 d x)+3360 b^4 \sinh (d x)\right )}{13440 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.42, size = 941, normalized size = 8.48 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.15, size = 334, normalized size = 3.01 \[ \frac {105 \, {\left (d x + c\right )} a^{4} - \frac {8 \, {\left (105 \, a^{3} b e^{\left (12 \, d x + 12 \, c\right )} + 630 \, a^{3} b e^{\left (10 \, d x + 10 \, c\right )} + 315 \, a^{2} b^{2} e^{\left (10 \, d x + 10 \, c\right )} + 1575 \, a^{3} b e^{\left (8 \, d x + 8 \, c\right )} + 1365 \, a^{2} b^{2} e^{\left (8 \, d x + 8 \, c\right )} + 560 \, a b^{3} e^{\left (8 \, d x + 8 \, c\right )} + 2100 \, a^{3} b e^{\left (6 \, d x + 6 \, c\right )} + 2310 \, a^{2} b^{2} e^{\left (6 \, d x + 6 \, c\right )} + 1400 \, a b^{3} e^{\left (6 \, d x + 6 \, c\right )} + 420 \, b^{4} e^{\left (6 \, d x + 6 \, c\right )} + 1575 \, a^{3} b e^{\left (4 \, d x + 4 \, c\right )} + 1890 \, a^{2} b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 1176 \, a b^{3} e^{\left (4 \, d x + 4 \, c\right )} + 252 \, b^{4} e^{\left (4 \, d x + 4 \, c\right )} + 630 \, a^{3} b e^{\left (2 \, d x + 2 \, c\right )} + 735 \, a^{2} b^{2} e^{\left (2 \, d x + 2 \, c\right )} + 392 \, a b^{3} e^{\left (2 \, d x + 2 \, c\right )} + 84 \, b^{4} e^{\left (2 \, d x + 2 \, c\right )} + 105 \, a^{3} b + 105 \, a^{2} b^{2} + 56 \, a b^{3} + 12 \, b^{4}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{7}}}{105 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.52, size = 129, normalized size = 1.16 \[ \frac {a^{4} \left (d x +c \right )+4 a^{3} b \tanh \left (d x +c \right )+6 a^{2} b^{2} \left (\frac {2}{3}+\frac {\mathrm {sech}\left (d x +c \right )^{2}}{3}\right ) \tanh \left (d x +c \right )+4 a \,b^{3} \left (\frac {8}{15}+\frac {\mathrm {sech}\left (d x +c \right )^{4}}{5}+\frac {4 \mathrm {sech}\left (d x +c \right )^{2}}{15}\right ) \tanh \left (d x +c \right )+b^{4} \left (\frac {16}{35}+\frac {\mathrm {sech}\left (d x +c \right )^{6}}{7}+\frac {6 \mathrm {sech}\left (d x +c \right )^{4}}{35}+\frac {8 \mathrm {sech}\left (d x +c \right )^{2}}{35}\right ) \tanh \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.57, size = 703, normalized size = 6.33 \[ a^{4} x + \frac {32}{35} \, b^{4} {\left (\frac {7 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d {\left (7 \, e^{\left (-2 \, d x - 2 \, c\right )} + 21 \, e^{\left (-4 \, d x - 4 \, c\right )} + 35 \, e^{\left (-6 \, d x - 6 \, c\right )} + 35 \, e^{\left (-8 \, d x - 8 \, c\right )} + 21 \, e^{\left (-10 \, d x - 10 \, c\right )} + 7 \, e^{\left (-12 \, d x - 12 \, c\right )} + e^{\left (-14 \, d x - 14 \, c\right )} + 1\right )}} + \frac {21 \, e^{\left (-4 \, d x - 4 \, c\right )}}{d {\left (7 \, e^{\left (-2 \, d x - 2 \, c\right )} + 21 \, e^{\left (-4 \, d x - 4 \, c\right )} + 35 \, e^{\left (-6 \, d x - 6 \, c\right )} + 35 \, e^{\left (-8 \, d x - 8 \, c\right )} + 21 \, e^{\left (-10 \, d x - 10 \, c\right )} + 7 \, e^{\left (-12 \, d x - 12 \, c\right )} + e^{\left (-14 \, d x - 14 \, c\right )} + 1\right )}} + \frac {35 \, e^{\left (-6 \, d x - 6 \, c\right )}}{d {\left (7 \, e^{\left (-2 \, d x - 2 \, c\right )} + 21 \, e^{\left (-4 \, d x - 4 \, c\right )} + 35 \, e^{\left (-6 \, d x - 6 \, c\right )} + 35 \, e^{\left (-8 \, d x - 8 \, c\right )} + 21 \, e^{\left (-10 \, d x - 10 \, c\right )} + 7 \, e^{\left (-12 \, d x - 12 \, c\right )} + e^{\left (-14 \, d x - 14 \, c\right )} + 1\right )}} + \frac {1}{d {\left (7 \, e^{\left (-2 \, d x - 2 \, c\right )} + 21 \, e^{\left (-4 \, d x - 4 \, c\right )} + 35 \, e^{\left (-6 \, d x - 6 \, c\right )} + 35 \, e^{\left (-8 \, d x - 8 \, c\right )} + 21 \, e^{\left (-10 \, d x - 10 \, c\right )} + 7 \, e^{\left (-12 \, d x - 12 \, c\right )} + e^{\left (-14 \, d x - 14 \, c\right )} + 1\right )}}\right )} + \frac {64}{15} \, a b^{3} {\left (\frac {5 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d {\left (5 \, e^{\left (-2 \, d x - 2 \, c\right )} + 10 \, e^{\left (-4 \, d x - 4 \, c\right )} + 10 \, e^{\left (-6 \, d x - 6 \, c\right )} + 5 \, e^{\left (-8 \, d x - 8 \, c\right )} + e^{\left (-10 \, d x - 10 \, c\right )} + 1\right )}} + \frac {10 \, e^{\left (-4 \, d x - 4 \, c\right )}}{d {\left (5 \, e^{\left (-2 \, d x - 2 \, c\right )} + 10 \, e^{\left (-4 \, d x - 4 \, c\right )} + 10 \, e^{\left (-6 \, d x - 6 \, c\right )} + 5 \, e^{\left (-8 \, d x - 8 \, c\right )} + e^{\left (-10 \, d x - 10 \, c\right )} + 1\right )}} + \frac {1}{d {\left (5 \, e^{\left (-2 \, d x - 2 \, c\right )} + 10 \, e^{\left (-4 \, d x - 4 \, c\right )} + 10 \, e^{\left (-6 \, d x - 6 \, c\right )} + 5 \, e^{\left (-8 \, d x - 8 \, c\right )} + e^{\left (-10 \, d x - 10 \, c\right )} + 1\right )}}\right )} + 8 \, a^{2} b^{2} {\left (\frac {3 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}} + \frac {1}{d {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} + 1\right )}}\right )} + \frac {8 \, a^{3} b}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.20, size = 1083, normalized size = 9.76 \[ a^4\,x-\frac {\frac {8\,\left (a^3\,b+a^2\,b^2\right )}{7\,d}+\frac {8\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (15\,a^3\,b+24\,a^2\,b^2+16\,a\,b^3\right )}{21\,d}+\frac {16\,{\mathrm {e}}^{6\,c+6\,d\,x}\,\left (15\,a^3\,b+24\,a^2\,b^2+16\,a\,b^3\right )}{21\,d}+\frac {16\,{\mathrm {e}}^{4\,c+4\,d\,x}\,\left (5\,a^3\,b+9\,a^2\,b^2+8\,a\,b^3+4\,b^4\right )}{7\,d}+\frac {40\,{\mathrm {e}}^{8\,c+8\,d\,x}\,\left (a^3\,b+a^2\,b^2\right )}{7\,d}+\frac {8\,a^3\,b\,{\mathrm {e}}^{10\,c+10\,d\,x}}{7\,d}}{6\,{\mathrm {e}}^{2\,c+2\,d\,x}+15\,{\mathrm {e}}^{4\,c+4\,d\,x}+20\,{\mathrm {e}}^{6\,c+6\,d\,x}+15\,{\mathrm {e}}^{8\,c+8\,d\,x}+6\,{\mathrm {e}}^{10\,c+10\,d\,x}+{\mathrm {e}}^{12\,c+12\,d\,x}+1}-\frac {\frac {8\,{\mathrm {e}}^{4\,c+4\,d\,x}\,\left (15\,a^3\,b+24\,a^2\,b^2+16\,a\,b^3\right )}{7\,d}+\frac {8\,{\mathrm {e}}^{8\,c+8\,d\,x}\,\left (15\,a^3\,b+24\,a^2\,b^2+16\,a\,b^3\right )}{7\,d}+\frac {8\,a^3\,b}{7\,d}+\frac {32\,{\mathrm {e}}^{6\,c+6\,d\,x}\,\left (5\,a^3\,b+9\,a^2\,b^2+8\,a\,b^3+4\,b^4\right )}{7\,d}+\frac {48\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a^3\,b+a^2\,b^2\right )}{7\,d}+\frac {48\,{\mathrm {e}}^{10\,c+10\,d\,x}\,\left (a^3\,b+a^2\,b^2\right )}{7\,d}+\frac {8\,a^3\,b\,{\mathrm {e}}^{12\,c+12\,d\,x}}{7\,d}}{7\,{\mathrm {e}}^{2\,c+2\,d\,x}+21\,{\mathrm {e}}^{4\,c+4\,d\,x}+35\,{\mathrm {e}}^{6\,c+6\,d\,x}+35\,{\mathrm {e}}^{8\,c+8\,d\,x}+21\,{\mathrm {e}}^{10\,c+10\,d\,x}+7\,{\mathrm {e}}^{12\,c+12\,d\,x}+{\mathrm {e}}^{14\,c+14\,d\,x}+1}-\frac {\frac {8\,\left (a^3\,b+a^2\,b^2\right )}{7\,d}+\frac {8\,a^3\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}}{7\,d}}{2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1}-\frac {\frac {8\,\left (15\,a^3\,b+24\,a^2\,b^2+16\,a\,b^3\right )}{105\,d}+\frac {16\,{\mathrm {e}}^{4\,c+4\,d\,x}\,\left (15\,a^3\,b+24\,a^2\,b^2+16\,a\,b^3\right )}{35\,d}+\frac {32\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (5\,a^3\,b+9\,a^2\,b^2+8\,a\,b^3+4\,b^4\right )}{35\,d}+\frac {32\,{\mathrm {e}}^{6\,c+6\,d\,x}\,\left (a^3\,b+a^2\,b^2\right )}{7\,d}+\frac {8\,a^3\,b\,{\mathrm {e}}^{8\,c+8\,d\,x}}{7\,d}}{5\,{\mathrm {e}}^{2\,c+2\,d\,x}+10\,{\mathrm {e}}^{4\,c+4\,d\,x}+10\,{\mathrm {e}}^{6\,c+6\,d\,x}+5\,{\mathrm {e}}^{8\,c+8\,d\,x}+{\mathrm {e}}^{10\,c+10\,d\,x}+1}-\frac {\frac {8\,\left (5\,a^3\,b+9\,a^2\,b^2+8\,a\,b^3+4\,b^4\right )}{35\,d}+\frac {8\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (15\,a^3\,b+24\,a^2\,b^2+16\,a\,b^3\right )}{35\,d}+\frac {24\,{\mathrm {e}}^{4\,c+4\,d\,x}\,\left (a^3\,b+a^2\,b^2\right )}{7\,d}+\frac {8\,a^3\,b\,{\mathrm {e}}^{6\,c+6\,d\,x}}{7\,d}}{4\,{\mathrm {e}}^{2\,c+2\,d\,x}+6\,{\mathrm {e}}^{4\,c+4\,d\,x}+4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1}-\frac {\frac {8\,\left (15\,a^3\,b+24\,a^2\,b^2+16\,a\,b^3\right )}{105\,d}+\frac {16\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a^3\,b+a^2\,b^2\right )}{7\,d}+\frac {8\,a^3\,b\,{\mathrm {e}}^{4\,c+4\,d\,x}}{7\,d}}{3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1}-\frac {8\,a^3\,b}{7\,d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \operatorname {sech}^{2}{\left (c + d x \right )}\right )^{4}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________